//
//  NetCommand.h
//  LegoClient
//
//  Created by Balazs Faludi on 02.01.10.
//  Copyright 2010 Universität Basel. All rights reserved.
//

#import <Foundation/Foundation.h>

#define kNetCommandDelimiter @" "
#define kNetCommandHeadLength 4

@class NetMessage;

@interface NetCommand : NSObject {
	NSString *_head;
	NSString *_body;
	NSArray *_args;
	int _argc;
}

- (id)initWithHead:(NSString *)newHead body:(NSString *)newBody;
- (id)initWithBytes:(const uint8_t *)bytes length:(NSUInteger)length;
- (id)initWithMessage:(NetMessage *)message;
- (NSString *)stringValue;
- (NetMessage *)message;
- (const uint8_t *)bytes;
- (NSUInteger)length;
- (int)count;
- (NSArray *)getArguments;
- (NSString *)getArgumentAtIndex:(int)index;
- (NSString *)head;
- (NSString *)body;
@end
